
function CNAcheckLogs () {
    top.document.title = "Pardus ";
    var image = document.getElementsByTagName("img");
    var pm = false;
    var am = false;
    var cl = false;
    for(i=0;i<image.length;i++){
        if(image[i].getAttribute("title")=="New private messages"){
            top.CNAalertPM ();
            top.document.title += "-PM";
            pm = true;
        }
        if(image[i].getAttribute("title")=="New alliance messages"){
            top.CNAalertAM ();
            top.document.title += "-AM";
            am = true;
        }
        if(image[i].getAttribute("title")=="New combat log entries"){
            top.CNAalertCL ();
            top.document.title += "-CL";
            cl = true;
        }
    }
    
    if (document.body.textContent.indexOf ("New alliance command station log entries!") != -1) {
        top.CNAalertACS ();
    } else {
        top.CNAstopACS ();
    }
    
    if (!pm) top.CNAstopPM ();
    if (!am) top.CNAstopAM ();
    if (!cl) top.CNAstopCL ();
}

window.onload = function() {setTimeout (CNAcheckLogs, 500)};